import request from "@/utils/request";
const interFace = "/interface";

// 查询接口分类列表
export function listCategory(data) {
  return request({
    url: `${interFace}/listCategory`,
    method: "post",
    data: data,
  });
}

// 查询接口分类树状结构
export function treeCategory(data) {
  return request({
    url: `${interFace}/treeCategory`,
    method: "post",
    data: data,
  });
}

// 新增接口分类
export function insertCategory(data) {
  return request({
    url: `${interFace}/insertCategory`,
    method: "post",
    data: data,
  });
}

// 修改接口分类
export function updateCategory(data) {
  return request({
    url: `${interFace}/updateCategory`,
    method: "post",
    data: data,
  });
}

// 删除接口分类
export function deleteCategory(data) {
  return request({
    url: `${interFace}/deleteCategory`,
    method: "post",
    data: data,
  });
}

// 导入接口分类
export const importData = `${interFace}/importData`;

// 导出接口分类
export function exportData(data) {
  return request({
    url: `${interFace}/export`,
    method: "post",
    data: data,
    responseType: "blob",
  });
}
